package com.apps.msg.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * describe:
 *
 * @author zhangyue
 * @date 2019/06/03
 */
@RestController
public class MsgController {

  @Value("${server.port}")
  String port;


  @GetMapping("/list")
  public String list(@RequestParam(value = "name", defaultValue = "apps") String name) {
    return "hi " + name + " ,list i am from port:" + port;
  }

  @GetMapping("/info")
  public String infp(@RequestParam(value = "name", defaultValue = "apps") String name) {
    return "hi msg info " + name + " ,list i am from port:" + port;
  }


  @RequestMapping("/send")
  public String send(@RequestParam(value = "name", defaultValue = "apps") String name) {
    return "hi " + name + " ,send i am from port:" + port;
  }



}
